package edu.chinasoft.spring01;

public
class Company implements Account {
    private Account target;
    //基本类必须以成员变量的形式出现在扩展类
    private XiaoWu xiaoWu;

    public
    Company() {
    }

    public
    Company(Account target, XiaoWu xiaoWu) {
        this.target = target;
        this.xiaoWu = xiaoWu;
    }

    @Override
    public
    void account() {
        xiaoWu.start();
        target.account();
        xiaoWu.end();
    }
}
